package cn.wawi.controller.data;

import javax.servlet.http.HttpServletRequest;
import cn.wawi.common.easyui.DataGrid;
import cn.wawi.controller.BaseController;
import cn.wawi.entity.data.Recruitment;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/data_recruitment")
public class RecruitmentController extends BaseController<Recruitment>{

	@InitBinder({"post","enterprise"})
	public void initBinder(WebDataBinder binder) {
		binder.setFieldDefaultPrefix("post.");
		binder.setFieldDefaultPrefix("enterprise.");
	}

	@ResponseBody
	@RequestMapping(value = "/list", method = RequestMethod.GET)
	public DataGrid list(HttpServletRequest request) {
		return findAllByPage(request);
	}
}
